def userinfo(request, json, **k):
  u = request.ctx.session.get('user')
  return json(dict(user=u))
